/*     */ package net.sourceforge.appgen.model;
/*     */ 
/*     */ import java.io.Serializable;
/*     */ import java.util.ArrayList;
/*     */ import java.util.List;
/*     */ 
/*     */ public class MappingData
/*     */   implements Serializable
/*     */ {
/*     */   private static final long serialVersionUID = 1L;
/*     */   private ConnectionInformation connectionInformation;
/*     */   private GenerationInformation generationInformation;
/*     */   private List<Entity> entityList;
/*     */ 
/*     */   public MappingData()
/*     */   {
/*  39 */     this(new ConnectionInformation(), new GenerationInformation(), new ArrayList());
/*     */   }
/*     */ 
/*     */   public MappingData(ConnectionInformation connectionInformation, GenerationInformation generationInformation, List<Entity> entityList) {
/*  43 */     this.connectionInformation = connectionInformation;
/*  44 */     this.generationInformation = generationInformation;
/*  45 */     this.entityList = entityList;
/*     */   }
/*     */ 
/*     */   public void addValueModifyListener(ValueModifyListener listener) {
/*  49 */     if (this.connectionInformation != null) {
/*  50 */       this.connectionInformation.addValueModifyListener(listener);
/*     */     }
/*     */ 
/*  53 */     if (this.generationInformation != null) {
/*  54 */       this.generationInformation.addValueModifyListener(listener);
/*     */     }
/*     */ 
/*  57 */     if (this.entityList != null)
/*  58 */       for (Entity entity : this.entityList) {
/*  59 */         entity.addValueModifyListener(listener);
/*     */ 
/*  61 */         List<Field> fieldList = entity.getFieldList();
/*  62 */         if (fieldList != null)
/*  63 */           for (Field field : fieldList)
/*  64 */             field.addValueModifyListener(listener);
/*     */       }
/*     */   }
/*     */ 
/*     */   public ConnectionInformation getConnectionInformation()
/*     */   {
/*  72 */     return this.connectionInformation;
/*     */   }
/*     */ 
/*     */   public void setConnectionInformation(ConnectionInformation connectionInformation) {
/*  76 */     this.connectionInformation = connectionInformation;
/*     */   }
/*     */ 
/*     */   public GenerationInformation getGenerationInformation() {
/*  80 */     return this.generationInformation;
/*     */   }
/*     */ 
/*     */   public void setGenerationInformation(GenerationInformation generationInformation) {
/*  84 */     this.generationInformation = generationInformation;
/*     */   }
/*     */ 
/*     */   public List<Entity> getEntityList() {
/*  88 */     return this.entityList;
/*     */   }
/*     */ 
/*     */   public void setEntityList(List<Entity> entityList) {
/*  92 */     this.entityList = entityList;
/*     */   }
/*     */ 
/*     */   public int hashCode()
/*     */   {
/*  98 */     int result = 1;
/*  99 */     result = 31 * result + (this.connectionInformation == null ? 0 : this.connectionInformation.hashCode());
/* 100 */     result = 31 * result + (this.entityList == null ? 0 : this.entityList.hashCode());
/* 101 */     result = 31 * result + (this.generationInformation == null ? 0 : this.generationInformation.hashCode());
/* 102 */     return result;
/*     */   }
/*     */ 
/*     */   public boolean equals(Object obj)
/*     */   {
/* 107 */     if (this == obj)
/* 108 */       return true;
/* 109 */     if (obj == null)
/* 110 */       return false;
/* 111 */     if (getClass() != obj.getClass())
/* 112 */       return false;
/* 113 */     MappingData other = (MappingData)obj;
/* 114 */     if (this.connectionInformation == null) {
/* 115 */       if (other.connectionInformation != null)
/* 116 */         return false;
/* 117 */     } else if (!this.connectionInformation.equals(other.connectionInformation))
/* 118 */       return false;
/* 119 */     if (this.entityList == null) {
/* 120 */       if (other.entityList != null)
/* 121 */         return false;
/* 122 */     } else if (!this.entityList.equals(other.entityList))
/* 123 */       return false;
/* 124 */     if (this.generationInformation == null) {
/* 125 */       if (other.generationInformation != null)
/* 126 */         return false;
/* 127 */     } else if (!this.generationInformation.equals(other.generationInformation))
/* 128 */       return false;
/* 129 */     return true;
/*     */   }
/*     */ }

/* Location:           C:\Users\lzl6066\Downloads\net.sourceforge.appgen_1.2.0\plugins\net.sourceforge.appgen_1.2.0.201002031718\
 * Qualified Name:     net.sourceforge.appgen.model.MappingData
 * JD-Core Version:    0.6.0
 */